<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/html; charset=UTF-8" http-equiv="content-type" />
<title> 新留言 - <?=SITE_NAME?> </title>
<?php include VIEWS.'header.html'?>

<?php if($code['forum'] == 1):?><script type="text/javascript">location.href='/forum/<?php echo $data['id']?>/'</script><?php endif?>

</head>

<body>
<?php include VIEWS.'topbar.html'?>

<div id="content">

    <?php include VIEWS.'leftnav.html'?>

    <div id="right">

    <h1>新话题</h1>

    <?php if($code['newPost']==4):?><div class="errbox roundNormal" style="width:80%">&nbsp;&nbsp;&nbsp;不写标题怎么可以啊！</div><br clear="all" /><?php endif?>
    <?php if($code['newPost']==8):?><div class="errbox roundNormal" style="width:80%">&nbsp;&nbsp;&nbsp;不写内容也不行啊！</div><br clear="all" /><?php endif?>
    <?php if($code['newPost']==16):?><div class="errbox roundNormal" style="width:80%">&nbsp;&nbsp;&nbsp;请输入您的姓名！</div><br clear="all" /><?php endif?>
    <?php if($code['newPost']==32):?><div class="errbox roundNormal" style="width:80%">&nbsp;&nbsp;&nbsp;请输入正确的Email！</div><br clear="all" /><?php endif?>
    <?php if($code['newPost']==128):?><div class="errbox roundNormal" style="width:80%">&nbsp;&nbsp;&nbsp;朋友，您输入的验证码好像不正确！</div><br clear="all" /><?php endif?>

    <div style="margin:10px"><img src="/images/icon_arrow_down.gif" /><a href="/forum/<?php echo $data['id']?>">取消添加</a></div>

    <div id="newtopic" style="text-align:left;margin-left:30px">
    <form action="/forum.php/<?php echo $data['id']?>/new" method="post" id="newtopicform">
    <table>
    <?php if(!$session['login']):?><tr><td>姓名：</td><td><input tabindex="2" value="<?php echo $data['uname']?>" id="uname" size="8" maxlength="20" type="text" name="uname"> &nbsp; <a tabindex="-1" style="font-size:12px" href="/login?from=<?php echo urlencode("/forum/{$data['id']}?new=1")?>">会员请登录</a></td></tr><?php endif?>
    <?php if(!$session['login']):?><tr><td>Email：</td><td><input tabindex="2" value="<?php echo $data['umail']?>" id="umail" size="20" maxlength="60" type="text" name="umail"></td></tr><?php endif?>
    <tr><td>标题：</td><td><input tabindex="2" value="<?php echo $data['subject']?>" id="subject" size="30" maxlength="80" type="text" name="subject"></td></tr>
    <tr><td valign="top">内容：</td><td><textarea tabindex="2" id="body" name="body" rows="10" cols="60"><?php echo $data['body']?></textarea></td></tr>
    <?php if (!$session['login']):?><tr><td>验证码：</td><td><input tabindex="2" id="rand_code" class="px12" type="text" name="rand_code" value="" size="8" maxlength="4" /> &nbsp; <img id="rand_code_img" src="/rand_code.php" align="absmiddle" /> &nbsp; <font class="px12">请输入左侧图片中的数字</font></td></tr><?php endif?>
    </table>
    <div style="text-align:left;margin:10px;margin-left:60px"><input accesskey="s" tabindex="3" type="submit" value="好了，就这样" class="bluebtn" /> &nbsp; <input tabindex="3" type="reset" onclick="javascript:location.href='/forum/<?php echo $data['id']?>'" value="取消" class="darkbtn" /></div>
    </form>
    </div>

    </div>
</div>

<?php include VIEWS.'copyright.html'?>

</body>
</html>
